Creating a variable to contain results of a SQL query

Next, double click the variable storage icon in the Process Tree to bring up the Variable Storage Dialog where you will create a variable to store the PO number obtained from the database.

Variable storage dialog. Click the new button at the bottom to add a variable to the list.

Click the “New” button to add a new variable see options for setting its properties.

Variable storage dialog. The right side of the dialog now has options for naming the variable, typing a description for it, setting the data type, and setting the size in form stamp.

Enter the variable name that you choose and enter text into the “Sample Data” field.  The text entered will be displayed within FormStamp until the data is actually obtained from the database.  We have chosen PO_Number as the variable name.

The variable storage dialog. The variable name has been set to P O underscore number, and the data type has been set to string. The width is 20 and the height is one row.

Note that the new variable PO_Number is now shown in the Variable Reference Window with an “SQL” icon preceding it.  The icon indicates that the variable was created in CaptureForm.

The P O number variable in the variable reference window.